package com.sf.fy.uav.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sf.fy.uav.entity.InvitationRecord;
import com.sf.fy.uav.mapper.InvitationRecordMapper;
import com.sf.fy.uav.service.IInvitationRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



/**
 * <p>
 * 邀请码记录表 服务实现类
 * </p>
 *
 * @author LTQ
 * @since 2023-08-23
 */
@Service
public class InvitationRecordServiceImpl extends ServiceImpl<InvitationRecordMapper, InvitationRecord> implements IInvitationRecordService {

    @Autowired
    private InvitationRecordMapper invitationRecordMapper;

    @Override
    public Long selectCountByInvitationCodeId(String invitationCodeId) {
        QueryWrapper<InvitationRecord> invitationRecordQueryWrapper = new QueryWrapper<>();
        invitationRecordQueryWrapper.eq("invitation_code_id", invitationCodeId);
        Long cnt = invitationRecordMapper.selectCount(invitationRecordQueryWrapper);
        return cnt;
    }
}
